<template>
  <div class="home">
    主页{{$store.state.user.profile.name}}
  </div>
</template>

<script>
import { useStore } from 'vuex'
import request from '@/utils/request'
console.log(useStore)
export default {
  name: 'HomeView',
  setup () {
    const store = useStore()
    request('/member/', 'get', { a: 1 })
    setTimeout(() => {
      // debugger
      store.commit('user/setName', '小花花')
    }, 3000)
  }
}
</script>
